/* Galaxy Hub — Dashboard topbar */

.dash-header {
  height: 64px;
  width: 100vw;
  padding: 0 1.25rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 0 rgba(38, 106, 180, 0.06), 0 4px 20px rgba(15, 23, 42, 0.04);
}

.dash-header__left,
.dash-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-header__left {
  flex: 1;
}

.dash-header__right {
  flex-shrink: 0;
}

/* Sidebar toggle */
.dash-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dash-header__toggle:hover {
  background: #eff6ff;
  border-color: rgba(38, 106, 180, 0.25);
  color: #266ab4;
  box-shadow: 0 4px 12px rgba(38, 106, 180, 0.12);
}

.dash-header__toggle.is-active {
  background: linear-gradient(135deg, rgba(38, 106, 180, 0.12), rgba(79, 70, 229, 0.08));
  border-color: rgba(38, 106, 180, 0.3);
  color: #266ab4;
}

/* Mobile logo */
.dash-header__brand {
  display: none;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.dash-header__brand img {
  height: 38px;
  width: auto;
}

/* Page context */
.dash-header__context {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.dash-header__page-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.dash-header__page-icon--blue { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.dash-header__page-icon--purple { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }
.dash-header__page-icon--green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.dash-header__page-icon--amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.dash-header__page-icon--orange { background: rgba(249, 115, 22, 0.12); color: #ea580c; }
.dash-header__page-icon--teal { background: rgba(6, 182, 212, 0.12); color: #0891b2; }
.dash-header__page-icon--indigo { background: rgba(99, 102, 241, 0.12); color: #4f46e5; }

.dash-header__page-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.dash-header__crumb {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.dash-header__page-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right-side actions */
.dash-header__divider {
  width: 1px;
  height: 28px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.dash-header__store-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #266ab4, #4f46e5);
  box-shadow: 0 4px 14px rgba(38, 106, 180, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-header__store-link:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(38, 106, 180, 0.38);
}

.dash-header__store-link i {
  font-size: 0.95rem;
}

.dash-header__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.dash-header__user:hover {
  border-color: rgba(38, 106, 180, 0.25);
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.dash-header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #266ab4, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.dash-header__user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.dash-header__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-header__role {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
}

.dash-header__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #ef4444;
  text-decoration: none;
  font-size: 1.05rem;
  border: 1px solid rgba(239, 68, 68, 0.15);
  background: #fff5f5;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dash-header__logout:hover {
  background: #fee2e2;
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
  transform: translateY(-1px);
}

/* Mobile sidebar overlay */
.dash-sidebar-overlay {
  position: fixed;
  inset: 0;
  top: 64px;
  background: rgba(15, 23, 42, 0.5);
  z-index: 980;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dash-sidebar-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 991px) {
  .dash-header__store-text {
    display: none;
  }

  .dash-header__store-link {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
  }
}

@media (max-width: 850px) {
  .dash-header {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dash-header__brand {
    display: flex;
  }

  .dash-header__page-icon {
    display: none;
  }

  .dash-header__crumb {
    display: none;
  }
}

@media (max-width: 767px) {
  .dash-header {
    padding: 0 0.85rem;
  }

  .dash-header__user-info {
    display: none;
  }

  .dash-header__user {
    padding: 0.2rem;
    border: none;
    background: transparent;
  }

  .dash-header__user:hover {
    box-shadow: none;
    background: transparent;
  }

  .dash-header__divider {
    display: none;
  }
}

@media (max-width: 490px) {
  .dash-header__context {
    display: none;
  }

  .dash-header__user {
    display: flex !important;
  }

  .dash-header__toggle.menuicn,
  .menuicn.dash-header__toggle {
    background: #f8fafc !important;
  }

  .dash-header__toggle.menuicn:hover,
  .menuicn.dash-header__toggle:hover {
    background: #eff6ff !important;
  }
}
